package com.info.zhiduoduo.repository.mapper.crowdsource;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.entity.crowdsource.CrowdsourceInvoiceRecord;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author cuichenglong
 * @since 2020-09-16
 */
public interface CrowdsourceInvoiceRecordMapper extends BaseMapper<CrowdsourceInvoiceRecord> {

    @Select(" SELECT * FROM zdd_crowdsource_invoice_record " +
            " WHERE DATE_FORMAT( `createtime`, '%Y' ) = #{year} " +
            " AND crowdsourceid = #{crowdsourceid} ")
    List<CrowdsourceInvoiceRecord> queryInvoiceRecordByYear(String year, int crowdsourceid);

}
